home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_100
/
184_01
/
fl1.mac
< prev
next >
Wrap
Text File
|
1980-01-01
|
2KB
|
77 lines
TITLE FLTLB
PAGE 64
; Floating point library
; C/80 3.0 (7/7/83) - (c) 1983 Walter Bilofsky - used by permission
;
;MODIFIED 8/84 by N.T.Carnevale to use AMD9511 (Intel 8231A)
;for floating point multiply/divide and MATHLIB functions.
;Replaces modules FLTLIB and MATHLIB of C/80's
;floating-point library.
;
;note--TITLE changed from C/80's original (FLTLIB)
;
;See accompanying documentation. Other useful information
;is in my article "Faster floating point math," which appeared
;on pp.46-54 of the Nov/Dec 1985 issue of Micro/Systems Journal.
;
;This file contains the first of three patches to the
;source code for FLTLIB.
;Use the following code to replace the source for FLTLIB
;from the beginning through the line labelled Dual:
;
;
;these were gleaned from LIB's listing of FLIBRARY.REL:
;
ENTRY Bf.Bl,Bf.Hc,Bf.Hi,Bf.Hu,Bl.Bf
ENTRY cf.eq,cf.ge,cf.gt,cf.le,cf.lt,cf.ne
ENTRY div10.,mul10.
ENTRY dum_
ENTRY errcod
ENTRY F.add,F.div,F.mul,F.neg,F.not,F.sub
ENTRY facl_,facl_1,facl_2,fac_,fac_1
ENTRY fadd.,fadda.,fcomp.,fdiv_a,fdiv_b,fdiv_c,fdiv_g
ENTRY flneg.,float.,flt.0,flt_pk
ENTRY fmlt_1,fmlt_2
ENTRY Hc.Bf,Hi.Bf,Hu.Bf
ENTRY inxhr.
ENTRY movfm.,movfr.,movmf.,movrf.
ENTRY pushf.,qint.,save_,save_1,sign.,zero.
;
EXTRN c.neg,c.sxt,eq.4,g.,Hc.Bl,Hi.Bl,Hu.Bl,L.add,L.neg
EXTRN llong.,movrm.,neq.4,slong.
;
;this preserves the 15 byte data area revealed by LIB:
DSEG
;
facl_: DB 0
facl_1: DB 0
facl_2: DB 0
fac_: DB 0
fac_1: DB 0
save_: DB 0
fmlt_1: DB 0
fmlt_2: DB 0
dum_: DB 0
save_1: DB 0
errcod: DB 0
fdiv_a: DB 0
fdiv_b: DB 0
fdiv_c: DB 0
fdiv_g: DB 0
;
CSEG
;
flt_pk: DS 0
F.add: XRA A
JMP Dual
F.sub: MVI A,1
JMP Dual
F.mul: JMP fpmul ;jump to new routines
; MVI A,2
; JMP Dual
F.div: JMP fpdiv
; MVI A,3
Dual: CALL movfr.
;
;END OF FL1.MAC